package org.gourpg.model.organization;

import java.sql.Timestamp;

/**
 * 组织配置实体
 */
public class OrgDetails {
    /**
     * 组织ID，组织的主键
     */
    private Integer orgId;

    /**
     * 组织名称
     */
    private String orgName;

    /**
     * 组织上层ID，形成自关联关系
     */
    private Integer orgParentId;

    /**
     * 组织创建时间
     */
    private Timestamp orgStartTime;

    /**
     * 组织关闭时间
     */
    private Timestamp orgEndTime;

    /**
     * 组织状态 （运营中、关闭）字典 ORG_STATUS
     */
    private String orgStatus;

    public OrgDetails() {
    }

    public Integer getOrgId() {
        return this.orgId;
    }

    public String getOrgName() {
        return this.orgName;
    }

    public Integer getOrgParentId() {
        return this.orgParentId;
    }

    public Timestamp getOrgStartTime() {
        return this.orgStartTime;
    }

    public Timestamp getOrgEndTime() {
        return this.orgEndTime;
    }

    public String getOrgStatus() {
        return this.orgStatus;
    }

    public void setOrgId(Integer orgId) {
        this.orgId = orgId;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public void setOrgParentId(Integer orgParentId) {
        this.orgParentId = orgParentId;
    }

    public void setOrgStartTime(Timestamp orgStartTime) {
        this.orgStartTime = orgStartTime;
    }

    public void setOrgEndTime(Timestamp orgEndTime) {
        this.orgEndTime = orgEndTime;
    }

    public void setOrgStatus(String orgStatus) {
        this.orgStatus = orgStatus;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof OrgDetails)) return false;
        final OrgDetails other = (OrgDetails) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$orgId = this.getOrgId();
        final Object other$orgId = other.getOrgId();
        if (this$orgId == null ? other$orgId != null : !this$orgId.equals(other$orgId)) return false;
        final Object this$orgName = this.getOrgName();
        final Object other$orgName = other.getOrgName();
        if (this$orgName == null ? other$orgName != null : !this$orgName.equals(other$orgName)) return false;
        final Object this$orgParentId = this.getOrgParentId();
        final Object other$orgParentId = other.getOrgParentId();
        if (this$orgParentId == null ? other$orgParentId != null : !this$orgParentId.equals(other$orgParentId))
            return false;
        final Object this$orgStartTime = this.getOrgStartTime();
        final Object other$orgStartTime = other.getOrgStartTime();
        if (this$orgStartTime == null ? other$orgStartTime != null : !this$orgStartTime.equals(other$orgStartTime))
            return false;
        final Object this$orgEndTime = this.getOrgEndTime();
        final Object other$orgEndTime = other.getOrgEndTime();
        if (this$orgEndTime == null ? other$orgEndTime != null : !this$orgEndTime.equals(other$orgEndTime))
            return false;
        final Object this$orgStatus = this.getOrgStatus();
        final Object other$orgStatus = other.getOrgStatus();
        if (this$orgStatus == null ? other$orgStatus != null : !this$orgStatus.equals(other$orgStatus)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof OrgDetails;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $orgId = this.getOrgId();
        result = result * PRIME + ($orgId == null ? 43 : $orgId.hashCode());
        final Object $orgName = this.getOrgName();
        result = result * PRIME + ($orgName == null ? 43 : $orgName.hashCode());
        final Object $orgParentId = this.getOrgParentId();
        result = result * PRIME + ($orgParentId == null ? 43 : $orgParentId.hashCode());
        final Object $orgStartTime = this.getOrgStartTime();
        result = result * PRIME + ($orgStartTime == null ? 43 : $orgStartTime.hashCode());
        final Object $orgEndTime = this.getOrgEndTime();
        result = result * PRIME + ($orgEndTime == null ? 43 : $orgEndTime.hashCode());
        final Object $orgStatus = this.getOrgStatus();
        result = result * PRIME + ($orgStatus == null ? 43 : $orgStatus.hashCode());
        return result;
    }

    public String toString() {
        return "OrgDetails(orgId=" + this.getOrgId() + ", orgName=" + this.getOrgName() + ", orgParentId=" + this.getOrgParentId() + ", orgStartTime=" + this.getOrgStartTime() + ", orgEndTime=" + this.getOrgEndTime() + ", orgStatus=" + this.getOrgStatus() + ")";
    }
}
